import './assets/main.css'
import 'element-plus/dist/index.css'
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import AdminUiStore from 'admin-ui-store'
// import Workflow from '../dist/workflow.es.js'
// import '../dist/style.css'
import Workflow from './index'
import 'admin-ui-store/dist/style.css'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import staticRoutes from '@/router/index'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.use(ElementPlus, {
  locale: zhCn
})
app.use(AdminUiStore, {
  locale: zhCn,
  resPrefix: import.meta.env.VUE_APP_PREFIX,
  loginUrl: import.meta.env.VUE_APP_LOGIN_URL,
  amapKey: import.meta.env.VUE_APP_AMAPKEY,
  mode: import.meta.env.VUE_MODE,
  appName: import.meta.env.VUE_PROJECT,
  staticRoutes
})
app.use(Workflow)
app.mount('#app')
